home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XParseGeometry.z / XParseGeometry
Encoding:
Text File  |  2002-10-03  |  8.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XParseGeometry, XWMGeometry - parse window geometry
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           int XParseGeometry(_p_a_r_s_e_s_t_r_i_n_g, _x__r_e_t_u_r_n, _y__r_e_t_u_r_n,
  13.           _w_i_d_t_h__r_e_t_u_r_n, _h_e_i_g_h_t__r_e_t_u_r_n)
  14.                 char *_p_a_r_s_e_s_t_r_i_n_g;
  15.                 int *_x__r_e_t_u_r_n, *_y__r_e_t_u_r_n;
  16.                 unsigned int *_w_i_d_t_h__r_e_t_u_r_n, *_h_e_i_g_h_t__r_e_t_u_r_n;
  17.  
  18.           int XWMGeometry(_d_i_s_p_l_a_y, _s_c_r_e_e_n, _u_s_e_r__g_e_o_m, _d_e_f__g_e_o_m,
  19.           _b_w_i_d_t_h, _h_i_n_t_s, _x__r_e_t_u_r_n, _y__r_e_t_u_r_n,
  20.                           _w_i_d_t_h__r_e_t_u_r_n, _h_e_i_g_h_t__r_e_t_u_r_n, _g_r_a_v_i_t_y__r_e_t_u_r_n)
  21.                 Display *_d_i_s_p_l_a_y;
  22.                 int _s_c_r_e_e_n;
  23.                 char *_u_s_e_r__g_e_o_m;
  24.                 char *_d_e_f__g_e_o_m;
  25.                 unsigned int _b_w_i_d_t_h;
  26.                 XSizeHints *_h_i_n_t_s;
  27.                 int *_x__r_e_t_u_r_n, *_y__r_e_t_u_r_n;
  28.                 int *_w_i_d_t_h__r_e_t_u_r_n;
  29.                 int *_h_e_i_g_h_t__r_e_t_u_r_n;
  30.                 int *_g_r_a_v_i_t_y__r_e_t_u_r_n;
  31.  
  32.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  33.           _p_o_s_i_t_i_o_n
  34.           _d_e_f_a_u_l_t__p_o_s_i_t_i_o_n
  35.                     Specify the geometry specifications.
  36.  
  37.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  38.  
  39.           _f_h_e_i_g_h_t
  40.           _f_w_i_d_t_h    Specify the font height and width in pixels
  41.                     (increment size).
  42.  
  43.           _p_a_r_s_e_s_t_r_i_n_g
  44.                     Specifies the string you want to parse.
  45.  
  46.           _s_c_r_e_e_n    Specifies the screen.
  47.  
  48.           _w_i_d_t_h__r_e_t_u_r_n
  49.           _h_e_i_g_h_t__r_e_t_u_r_n
  50.                     Return the width and height determined.
  51.  
  52.           _x_a_d_d_e_r
  53.           _y_a_d_d_e_r    Specify additional interior padding needed in the
  54.                     window.
  55.  
  56.           _x__r_e_t_u_r_n
  57.           _y__r_e_t_u_r_n  Return the x and y offsets.
  58.  
  59.           _b_w_i_d_t_h    Specifies the border width.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           _h_i_n_t_s     Specifies the size hints for the window in its
  75.                     normal state.
  76.  
  77.           _d_e_f__g_e_o_m  Specifies the application's default geometry or
  78.                     NULL.
  79.  
  80.           _g_r_a_v_i_t_y__r_e_t_u_r_n
  81.                     Returns the window gravity.
  82.  
  83.           _u_s_e_r__g_e_o_m Specifies the user-specified geometry or NULL.
  84.  
  85.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  86.           By convention, X applications use a standard string to
  87.           indicate window size and placement.  _X_P_a_r_s_e_G_e_o_m_e_t_r_y makes it
  88.           easier to conform to this standard because it allows you to
  89.           parse the standard window geometry.  Specifically, this
  90.           function lets you parse strings of the form:
  91.  
  92.           [=][<_w_i_d_t_h>{xX}<_h_e_i_g_h_t>][{+-}<_x_o_f_f_s_e_t>{+-}<_y_o_f_f_s_e_t>]
  93.  
  94.           The fields map into the arguments associated with this
  95.           function.  (Items enclosed in <> are integers, items in []
  96.           are optional, and items enclosed in {} indicate ``choose one
  97.           of.''  Note that the brackets should not appear in the
  98.           actual string.)  If the string is not in the Host Portable
  99.           Character Encoding, the result is implementation-dependent.
  100.  
  101.           The _X_P_a_r_s_e_G_e_o_m_e_t_r_y function returns a bitmask that indicates
  102.           which of the four values (width, height, xoffset, and
  103.           yoffset) were actually found in the string and whether the x
  104.           and y values are negative. By convention, -0 is not equal to
  105.           +0, because the user needs to be able to say ``position the
  106.           window relative to the right or bottom edge.''  For each
  107.           value found, the corresponding argument is updated.  For
  108.           each value not found, the argument is left unchanged.  The
  109.           bits are represented by _X_V_a_l_u_e, _Y_V_a_l_u_e, _W_i_d_t_h_V_a_l_u_e,
  110.           _H_e_i_g_h_t_V_a_l_u_e, _X_N_e_g_a_t_i_v_e, or _Y_N_e_g_a_t_i_v_e and are defined in
  111.           <_X_1_1/_X_u_t_i_l._h>.  They will be set whenever one of the values
  112.           is defined or one of the signs is set.
  113.  
  114.           If the function returns either the _X_V_a_l_u_e or _Y_V_a_l_u_e flag,
  115.           you should place the window at the requested position.
  116.  
  117.           The _X_W_M_G_e_o_m_e_t_r_y function combines any geometry information
  118.           (given in the format used by _X_P_a_r_s_e_G_e_o_m_e_t_r_y) specified by
  119.           the user and by the calling program with size hints (usually
  120.           the ones to be stored in WM_NORMAL_HINTS) and returns the
  121.           position, size, and gravity (_N_o_r_t_h_W_e_s_t_G_r_a_v_i_t_y,
  122.           _N_o_r_t_h_E_a_s_t_G_r_a_v_i_t_y, _S_o_u_t_h_E_a_s_t_G_r_a_v_i_t_y, or _S_o_u_t_h_W_e_s_t_G_r_a_v_i_t_y)
  123.           that describe the window.  If the base size is not set in
  124.           the _X_S_i_z_e_H_i_n_t_s structure, the minimum size is used if set.
  125.           Otherwise, a base size of zero is assumed.  If no minimum
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXPPPPaaaarrrrsssseeeeGGGGeeeeoooommmmeeeettttrrrryyyy((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.           size is set in the hints structure, the base size is used.
  141.           A mask (in the form returned by _X_P_a_r_s_e_G_e_o_m_e_t_r_y) that
  142.           describes which values came from the user specification and
  143.           whether or not the position coordinates are relative to the
  144.           right and bottom edges is returned.  Note that these
  145.           coordinates will have already been accounted for in the
  146.           x_return and y_return values.
  147.  
  148.           Note that invalid geometry specifications can cause a width
  149.           or height of zero to be returned.  The caller may pass the
  150.           address of the hints win_gravity field as gravity_return to
  151.           update the hints directly.
  152.  
  153.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  154.           XSetWMProperties(3X11)
  155.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.